package com.gable.exhibition.service;

import com.gable.common.util.ReturnResultUtil;
import com.gable.exhibition.model.User;
import com.gable.exhibition.view.UserView;
import com.sun.org.apache.xpath.internal.operations.Bool;

import java.util.List;
import java.util.Map;

/**
 * Created by Lesson on 2017/12/28.
 */
public interface UserService {

    /**
     * web端用户登录，
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/5
     * @return
     */
    ReturnResultUtil userLoginByWeb(UserView userView);

    /**
     * app端用户登录，
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/5
     * @return
     */
    ReturnResultUtil userLoginByApp(UserView userView);



    /**
     * 修改密码
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/5
     * @return
     */
    ReturnResultUtil updatePassword(UserView userView);

    /**
     * 用户页面查询条件初始化
     * @param map
     * @Create user jacky
     * @Create date 2018/2/5
     * @return
     */
    ReturnResultUtil queryUserTermInit(Map map);

    /**
     * 获取用列表信息
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/6
     * @return
     */
    ReturnResultUtil queryUserList(UserView userView);

    /**
     * 保存用户信息
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/7
     * @return
     */
    ReturnResultUtil addOrUpdateUser(UserView userView);

    /**
     * 获取用户详情
     * @param userId
     * @Create user jacky
     * @Create date 2018/2/7
     * @return
     */
    ReturnResultUtil queryUserInfo(Long userId);

    ReturnResultUtil queryUser(UserView userView);

    /**
     * 根据流程数据中的工程师电话号码判断用户是否存在
     * @return
     * @Create user jacky
     * @Create date 2018/3/1
     */
    ReturnResultUtil queryUserByEngineerPhone(String engineerPhone,String engineerName,Long serviceId,Long serviceType);

    /***
     * 修改用户上次登录时间，和是否是微信登录
     * @param userId
     * @param bl
     * @Create user jacky
     * @Create date 2018/3/1
     */
    void  updateUserLastLoginTime(Long userId, Boolean bl);

    /**
     * 用户数据补全
     * @param user
     * @Create user jacky
     * @Create date 2018/3/7
     * @return
     */
    ReturnResultUtil completionUserInfo(UserView user);

    /**
     * 更新用户姓名
     * @param userView
     * @return
     */
    ReturnResultUtil updateRealName(UserView userView);

    ReturnResultUtil getOpenId(String code);

    /**
     * 绑定微信
     * @param userView
     * @Create user jacky
     * @Create date 2018/2/5
     * @return
     */
    ReturnResultUtil updateOpenId(UserView userView);

    /**
     * 获取用户信息
     * @Create user jacky
     * @Create date 2019/7/23
     * @return
     */
    ReturnResultUtil querySysUrl(Long userId);

    /**
     * 插入用户和菜单的关联关系
     * @param userId
     * @param urlIdList
     * @return
     */
    ReturnResultUtil saveSetMenu(Long userId,List<Long> urlIdList);
}
